package com.situ.science.controller;

import com.situ.science.pojo.Faculty;
import com.situ.science.service.IFacultyService;
import com.situ.science.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/faculty")
public class FacultyController {
    @Autowired
    private IFacultyService facultyService;
    @GetMapping("/list")
    public Result getFacultyList() {
       List<Faculty> facultyList = facultyService.getFacultyList();
       return Result.ok(facultyList);
    }
}
